#ifndef _MOUSEEVENT_H_
#define _MOUSEEVENT_H_

#include "Event.h"

namespace Engine2D
{
    class MouseMoveEvent : public Event 
    {
        REGISTER_EVENT(T_MouseMotionEvent)
    public:
        MouseMoveEvent(int x_, int y_, int xref_, int yref_, uint32_t state_) 
            : Event(T_MouseMotionEvent, "MouseMoveEvent"), x(x_), y(y_), xref(xref_), yref(yref_), state(state_) {}
        virtual ~MouseMoveEvent() = default;
        int x, y, xref, yref;
        uint32_t state;
    };


    class MouseButtonEvent : public Event
    {
        REGISTER_EVENT(T_MouseButtonEvent)
    public:
        struct Prop{
            uint8_t button;
            uint8_t state;
            uint8_t clicks;
            int32_t x, y;
        } prop;
        MouseButtonEvent(Prop prop_) : Event(T_MouseButtonEvent, "MouseButtonEvent") , prop(prop_) {}
        virtual ~MouseButtonEvent() = default;
    };

    class MouseWheelEvent : public Event
    {
        REGISTER_EVENT(T_MouseWheelEvent)
    public:
        struct Prop {
            int32_t x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */
            int32_t y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */
            uint32_t direction;   /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
            float preciseX;     /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
            float preciseY;     /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
            int32_t mouseX;      /**< X coordinate, relative to window (added in 2.26.0) */
            int32_t mouseY;      /**< Y coordinate, relative to window (added in 2.26.0) */
        } prop;
        MouseWheelEvent(Prop prop_) : Event(T_MouseWheelEvent, "MouseWheelEvent") , prop(prop_) {}
        virtual ~MouseWheelEvent() = default;
    };

} // namespace Engine2D


#endif